package controller;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import service.SysUrlService;
import util.MessageUtil;
import util.ReturnResultUtil;
import view.QueryView;

/**
 * Created by gable on 2018/5/22.
 */
@Controller
public class SysUrlController {

    private final Log logger = LogFactory.getLog(this.getClass());

    @Autowired
    SysUrlService sysUrlService;

    @RequestMapping(value = "menu",method = RequestMethod.POST)
    @ResponseBody
    public ReturnResultUtil queryUrl(QueryView queryView){
        try {
            return sysUrlService.queryUrl(queryView);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return new ReturnResultUtil(0, MessageUtil.ERROR);
    }
}
